Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AG-1471, AG-1473, AG-1474: add workflow to create agora/data Docker image and run end-to-end tests #1311

Merged

Conversation

hallieswan
Copy link
Contributor

@hallieswan hallieswan commented Jun 5, 2024

Currently, the workflow builds the agora/data image on the runner and then runs the e2e tests. In a future PR, we'll split this workflow into three jobs:

  1. check if the agora/image already exists in a remote registry
  2. build and push the image to the remote registry if it does not already exist
  3. pull the image from the remote registry, then run e2e tests

Note: we will need to add the appropriate environment variables and secrets to this repository before the workflow will run.

Comment on lines +79 to +80
port,
reuseExistingServer: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse the existing server rather than having playwright start the server for us

);
let dbUser: string | undefined;
let dbPass: string | undefined;
if (process.env.APP_ENV === 'e2e') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get credentials from environment variables when running e2e tests

@hallieswan hallieswan force-pushed the AG-1471_AG-1473_AG-1474 branch from 97739dd to 7e28125 Compare June 6, 2024 15:57
Comment on lines +7 to +9
# Run in Sage repo on develop or main branches
# and on all branches in user-owned forks
if: ${{ github.ref_name == 'develop' || github.ref_name == 'main' || github.actor == github.repository_owner }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forks do not have access to the Sage repo's secrets, so don't run this workflow in the Sage repo on pull_request trigger. Instead, run the workflow when there is a push to develop/main or when the user pushes to a repo that they own (i.e. their forked repo).

@hallieswan hallieswan marked this pull request as ready for review June 6, 2024 18:49
@sagely1
Copy link
Contributor

sagely1 commented Jun 6, 2024

Looks great!

@sagely1 sagely1 merged commit 41a3a2f into Sage-Bionetworks:develop Jun 6, 2024
3 checks passed
@hallieswan hallieswan deleted the AG-1471_AG-1473_AG-1474 branch June 6, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants